package com.wsb.wetchat.controller;

import com.wsb.wetchat.exption.BussinesExpetion;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wang shaobo
 * @date 2022/6/20  19:29
 */
@RestController
public class ExpetionController {


    @RequestMapping(value = "/expection/name",method = RequestMethod.GET)
    public String getExpectionName(String name){

        if(name == null || "".equals(name)){
            throw new BussinesExpetion(201,"失败");
        }

        return name;


    }

}
